package com.gongfutrip.trans.remoting.netty;

public class NettyClientConfig {
  private static final boolean openBanlance = true;
  private int clientWorkerThreads = 4;
  private int clientCallbackExecutorThreads = Runtime.getRuntime().availableProcessors();
  private int clientOnewaySemaphoreValue = 65535;
  private int clientAsyncSemaphoreValue = 65535;
  private int connectTimeoutMillis = 3000;
  private long channelNotActiveInterval = 1000 * 60;

  private int clientChannelMaxIdleTimeSeconds = 120;

  private int clientSocketSndBufSize = 65535;
  private int clientSocketRcvBufSize = 65535;
  private boolean clientPooledByteBufAllocatorEnable = false;
  private boolean clientCloseSocketIfTimeout = false;

  public boolean isClientCloseSocketIfTimeout() {
    return clientCloseSocketIfTimeout;
  }

  public void setClientCloseSocketIfTimeout(final boolean clientCloseSocketIfTimeout) {
    this.clientCloseSocketIfTimeout = clientCloseSocketIfTimeout;
  }

  public int getClientWorkerThreads() {
    return clientWorkerThreads;
  }

  public void setClientWorkerThreads(int clientWorkerThreads) {
    this.clientWorkerThreads = clientWorkerThreads;
  }

  public int getClientOnewaySemaphoreValue() {
    return clientOnewaySemaphoreValue;
  }

  public void setClientOnewaySemaphoreValue(int clientOnewaySemaphoreValue) {
    this.clientOnewaySemaphoreValue = clientOnewaySemaphoreValue;
  }

  public int getConnectTimeoutMillis() {
    return connectTimeoutMillis;
  }

  public void setConnectTimeoutMillis(int connectTimeoutMillis) {
    this.connectTimeoutMillis = connectTimeoutMillis;
  }

  public int getClientCallbackExecutorThreads() {
    return clientCallbackExecutorThreads;
  }

  public void setClientCallbackExecutorThreads(int clientCallbackExecutorThreads) {
    this.clientCallbackExecutorThreads = clientCallbackExecutorThreads;
  }

  public long getChannelNotActiveInterval() {
    return channelNotActiveInterval;
  }

  public void setChannelNotActiveInterval(long channelNotActiveInterval) {
    this.channelNotActiveInterval = channelNotActiveInterval;
  }

  public int getClientAsyncSemaphoreValue() {
    return clientAsyncSemaphoreValue;
  }

  public void setClientAsyncSemaphoreValue(int clientAsyncSemaphoreValue) {
    this.clientAsyncSemaphoreValue = clientAsyncSemaphoreValue;
  }

  public int getClientChannelMaxIdleTimeSeconds() {
    return clientChannelMaxIdleTimeSeconds;
  }

  public void setClientChannelMaxIdleTimeSeconds(int clientChannelMaxIdleTimeSeconds) {
    this.clientChannelMaxIdleTimeSeconds = clientChannelMaxIdleTimeSeconds;
  }

  public int getClientSocketSndBufSize() {
    return clientSocketSndBufSize;
  }

  public void setClientSocketSndBufSize(int clientSocketSndBufSize) {
    this.clientSocketSndBufSize = clientSocketSndBufSize;
  }

  public int getClientSocketRcvBufSize() {
    return clientSocketRcvBufSize;
  }

  public void setClientSocketRcvBufSize(int clientSocketRcvBufSize) {
    this.clientSocketRcvBufSize = clientSocketRcvBufSize;
  }

  public boolean isClientPooledByteBufAllocatorEnable() {
    return clientPooledByteBufAllocatorEnable;
  }

  public void setClientPooledByteBufAllocatorEnable(boolean clientPooledByteBufAllocatorEnable) {
    this.clientPooledByteBufAllocatorEnable = clientPooledByteBufAllocatorEnable;
  }

  public boolean openBanlance() {
    return this.openBanlance;
  }
}
